def monkey1(n):
    return 1 if n == 1 else (monkey1(n-1)+1)*2

print(monkey1(10))


def monkey2(n):
    allpeachs = 1
    for i in range(1,n):
        allpeachs = (allpeachs+1)*2
    return allpeachs
print(monkey2(10))

def monkey3(n, allpeachs=1):
    if n < 2:
        return allpeachs
    return monkey3(n-1, (allpeachs+1)*2)
print(monkey3(10))